package com.fsy.entities;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

@Data
@Accessors(chain = true)
@HeadRowHeight(value = 35)  //表头行高
@ContentRowHeight(value = 25)   //内容行高
//导出excel表
public class Students_exportExcel implements Serializable {
    @ExcelProperty({"学生信息", "编号"})
    private Integer id;

    @ExcelProperty({"学生信息", "姓名"})
    private String name;

    @ExcelProperty({"学生信息", "年龄"})
    private Integer age;

    @ExcelProperty({"学生信息", "性别"})
    private String sex;

    @ExcelProperty({"学生信息", "手机号"})
    private String phone;

    @ExcelProperty({"学生信息", "QQ"})
    private String QQ;

    @ExcelProperty({"学生信息", "微信"})
    private String weixin;

    @ExcelIgnore
    private Integer stuStatus;

    @ExcelProperty({"学生信息","状态"})
    private String statusName;

    public String getStatusName() {
        if (stuStatus==1){
            return statusName = "已录入未分配";
        }else if (stuStatus==2){
            return statusName = "已分配咨询师";
        }else if (stuStatus==3){
            return statusName = "正在跟踪";
        }else if (stuStatus==4){
            return statusName = "跟踪结束（已缴费）";
        }else {
            return statusName = "跟踪结束（失败）";
        }
    }

    @ExcelProperty({"学生信息", "创建时间"})
    private String createTime;

    @ExcelProperty({"学生信息", "第一次跟踪时间"})
    private String firstVisitTime;

    @ExcelIgnore
    private int isPay;

    @ExcelProperty({"学生信息", "是否付款"})
    private String isPayName;

    public String getIsPayName() {
        if (isPay==1){
            return isPayName="已付款";
        }else {
            return isPayName="未付款";
        }
    }

    @ExcelProperty({"学生信息", "付款时间"})
    private String payTime;

    @ExcelProperty({"学生信息", "付款金额"})
    private String money;

}
